<% attribute_name = "semantic_type" %>
Semantic Types
<% if logged_in? %>
  <%= link_to_function("[+]", visual_effect(:toggle_slide,
      "add_" + annotatable.class.name.downcase + "_" + attribute_name + annotatable.id.to_s,
      :duration => 0.3), :class => "active", :style => "") -%>
<% else %>
  <% session[:original_uri] = request.request_uri %>
  <%= link_to ("[+]"), :controller => "home", :action => "login" %>
<% end %>

<% annotations = annotatable.annotations_with_attribute(attribute_name) %>
<% if annotations %>
  <% annotations.each do |ann| %>
    <div class="data_format">
      <span style="float: left;">
        <%=h ann.value -%>
      </span>
      <span style="float: right;">
        <i><%=h ann.source.name -%></i>
        <%= link_to '[x]', ann, :confirm => 'Are you sure you want to delete this annotation?  This cannot be undone.', 
            :method => :delete if logged_in? && ann.source==current_user -%>	
      </span><br/>
    </div>	
  <% end %>
<% end %>

<%= render :partial => 'annotations/annotation_form', 
    :locals => {:attribute_name => attribute_name, :annotatable_type => annotatable.class.name,
	  :annotatable_id => annotatable.id} %>